package com.momomian.common.annotation;

import com.momomian.common.annotation.impl.DateCheckValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;


/**
 * 日期格式校验
 * @author momomian
 * @date 2020/10/22
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD,ElementType.FIELD})
@Documented
@Constraint(validatedBy = DateCheckValidator.class)
public @interface DateCheck {

    String message()  default "日期格式校验错误";

    String pattern();


    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
